import Vue from 'vue'
//路由方法集
import VRouter from 'vue-router'
//首页
import index from '../index'
//404页面
import NotFoundComponent from '../components/other/NotFoundComponent'
//登录注册模块
import LoginAll from '../components/LoginAll/LoginAll'
import ToLogin from '../components/LoginAll/ToLogin'
import ToPhone from '../components/LoginAll/ToPhone'
import ToCode from '../components/LoginAll/ToCode'
import ToPassWord from '../components/LoginAll/ToPassWord'
import ResetPswds from '../components/LoginAll/ResetPswds'

//盘评块
import PlateAll from '../components/PlateRating/PlateAll'
import BourseAll from '../components/PlateRating/BourseAll'
import BourseFocus from '../components/PlateRating/BourseFocus'
import BourseList from '../components/PlateRating/BourseList'
import CollectAll from '../components/PlateRating/CollectAll'
import CollectFocus from '../components/PlateRating/CollectFocus'
import CollectList from '../components/PlateRating/CollectList'
import Details from '../components/PlateRating/Details'
Vue.use(VRouter)
 let router = new  VRouter({
	mode:'history',
	routes:[
		{
			path:'/',
			redirect:'/LoginAll',
			component:index
		},
		{ 
		 	path: '*',
		 	component:NotFoundComponent
		 },
		 {
		 	path:'/LoginAll',
		 	name:'登录注册模块',
		 	component:LoginAll,
		 	redirect:'/LoginAll/ToLogin',
		 	children:[ 
		 		{
		 			path:'/LoginAll/ToLogin',
		 			component:ToLogin
		 		},
		 		{
		 			path:'/LoginAll/ToPhone',
		 			component:ToPhone,
		 			children:[
		 				{
		 					path:':type'
		 				}
		 			]
		 		},
		 		{
		 			path:'/LoginAll/ToCode',
		 			component:ToCode,
		 			children:[
		 				{
		 					path:"/LoginAll/ToCode/:type/:phone"
		 				} 
		 			]
		 		},
		 		{
		 			path:'/LoginAll/ToPassWord',
		 			component:ToPassWord,
		 			children:[
		 				{
		 					path:"/LoginAll/ToPassWord/:yzm/:phone"
		 				} 
		 			]
		 		},
		 		{
		 			path:'/LoginAll/ResetPswds',
		 			component:ResetPswds,
		 			children:[
		 				{
		 					path:"/LoginAll/ResetPswds/:yzm/:phone"
		 				} 
		 			]
		 		}
		 	]
		 },
		 {
		 	path:'/PlateAll',
		 	name:'盘评模块',
		 	component:PlateAll,
		 	redirect:'/PlateAll/BourseAll',
			children:[ 
				{
					path:'/PlateAll/BourseAll',
					component:BourseAll,
					children:[
						{
							path:':MembersID/:showType'
						}
					]
				},
				{
					path:'/PlateAll/BourseFocus',
					component:BourseFocus
				},
				{
					path:'/PlateAll/BourseList',
					component:BourseList
				},
				{
					path:'/PlateAll/CollectAll',
					component:CollectAll
				},
				{
					path:'/PlateAll/CollectFocus',
					component:CollectFocus
				},
				{
					path:'/PlateAll/CollectList',
					component:CollectList
				},
				{
					path:'/PlateAll/Details',
					component:Details
				} 

			]
		 } 
	]
})
 export default router;